<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>YuHu - My Travel Agent</title>

<script type="text/javascript" src="./js/jquery-1.3.2.min.js"></script>
<script type="text/javascript" src="./js/jquery-ui-1.7.2.custom.min.js"></script>

<link href="./css/cupertino/jquery-ui-1.7.2.custom2.css" rel="stylesheet" type="text/css" />
<link href="./css/style.css" rel="stylesheet" type="text/css" />
<?php
$host_sql = "localhost";
$username_sql = "sysuser";
$password_sql = "sysuser";
$link = mysql_connect($host_sql, $username_sql, $password_sql);
mysql_select_db('mydb', $link);
?>

<script type="text/javascript">
	$(function() {
		$(".accordion").accordion({
		    collapsible: true,
		    autoHeight: false
			});
		$('.myDatePicker_tour').datepicker({
			numberOfMonths: 2,
			showButtonPanel: true
		});
		$(".tabs").tabs();
		
	});

	function newTourSubmit() {
		tour_name = $("#tour_name").val();
		tour_startdate = $("#tour_startdate").val();
		tour_enddate = $("#tour_enddate").val();
		tour_people = $("#tour_people").val();
		tour_description = $("#tour_description").val();
		//tour_style = $("#tour_style").val();
		//tour_location = $("#tour_location").val();
		//alert(tour_name + "/" + tour_startdate + "/" + tour_enddate + "/" + tour_people + "/" + tour_description + "/" + tour_style + "/" + tour_location);

		// Process New Tour
		$.post("main_new_tour.php", {
			tour_name : $("#tour_name").val(),
			tour_startdate : $("#tour_startdate").val(),
			tour_enddate : $("#tour_enddate").val(),
			tour_people : $("#tour_people").val(),
			tour_description : $("#tour_description").val(),
			//tour_style : $("#tour_style").val(),
			//tour_location : $("#tour_location").val()			
		},
		function(data){
			indexTour = data;

			//Load title
			$.post("main_load_title.php", {
				indexTour : data
			},
			function(data2){
				$("#MainTitle").html(data2);
			}
			);//end

			//Load tab and form
			$.post("main_load_tabs.php", {
				indexTour : data
			},
			function(data3){
				$("#MainTabAreaDiv").html(data3);
				$("#MainTabArea").tabs();
				$('.myDatePicker_tour').datepicker({
					numberOfMonths: 2,
					showButtonPanel: true
				});
				$(".accordion").accordion({
				    collapsible: true,
				    autoHeight: false
					});
			}
			);//End


	
		}
		);
		



	}
	</script>

</head>
<body>
<div id="outer">
	<div id="header">
		<h1><a href="#">[Logo]</a></h1>
		<h2>by Free CSS Templates</h2>
	</div>
	<div id="menu">
		<ul>
			<li class="first"><a href="#" accesskey="1" title="">Home</a></li>
			<li><a href="#" accesskey="2" title="">About Us</a></li>
			<li><a href="#" accesskey="3" title="">Products</a></li>
			<li><a href="#" accesskey="4" title="">Services</a></li>
			<li><a href="#" accesskey="5" title="">Contact Us</a></li>
		</ul>
	</div>
	<div id="content">
		<div id="primaryContentContainer">
			<div id="primaryContent">
<!--Main Area ----------------------------------------------------------------------------  -->
<div id="MainTitle" class="MainTitle">
Tip :: Create your own tour.
</div>
<div id="MainTabAreaDiv">
<div id="MainTabArea" class="tabs">
		<ul>
			<li><a href="#tabs-tour">Create Your Tour</a></li>
			<!--<li><a href="#tabs-details">Details</a></li>  -->
		</ul>
		<div id="tabs-tour">
			Tour Name:<input type="text" name="tour_name" id="tour_name" /> 
			Start on:<input type="text" class="myDatePicker_tour" name="tour_startdate" id="tour_startdate" /> 
			End on:<input type="text" class="myDatePicker_tour" name="tour_enddate" id="tour_enddate" /> 
			People:<input type="text" name="tour_people" id="tour_people" /><br />
			Description:<input type="text" name="tour_description" id="tour_description" />

			<input type="button" name="newTourSubmit" id="newTourSubmit" value="add" onclick="newTourSubmit()" />			
		</div>
		<!--<div id="tabs-details">
		
		</div> -->
</div>
</div>


<!--Main Area ----------------------------------------------------------------------------  -->	
			</div>
		</div>
	
		<div id="secondaryContent">
<!--Menu Area ----------------------------------------------------------------------------  -->	
<div id="mainMenu" class="accordion">
	<h3><a href="#">In Process</a></h3>
	<div id="mainMenu_InProcess" >
		In Process
	</div>
	<h3><a href="#">Share</a></h3>
	<div id="mainMenu_Share" >
		Share
	</div>	
	<h3><a href="#">Public</a></h3>
	<div id="mainMenu_Public" >
		Public
	</div>
	<h3><a href="#">History</a></h3>
	<div id="mainMenu_History" >
		History
	</div>		


</div>
<!--Menu Area ----------------------------------------------------------------------------  -->
		</div>
		<div class="clear"></div>
	</div>
	<div id="footer">
		<p>Copyright &copy; 2006 Sitename.com. Designed by <a href="http://www.freecsstemplates.org">Free CSS Templates</a></p>
	</div>
</div>
</body>
</html>
<?php mysql_close($link); ?>
